package com.niiwoo.activity.stage.enums.prize;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Description 红包操作类型
 * @Author zq
 * @Date 2017/11/24
 */
@Getter
@AllArgsConstructor
public enum UserPrizeUseActionTypeEnum {

    ACTIONTYPE_LOAN((byte) 0, "借款时使用"),
    ACTIONTYPE_INVESTMENT((byte) 1, "投资时使用"),
    ACTIONTYPE_GUARANTEE((byte) 2, "担保时使用"),
    ACTIONTYPE_WITHDRAW((byte) 3, "提现时使用"),
    ACTIONTYPE_CASH((byte) 4, "现金使用");

    private Byte type;
    private String description;

    public UserPrizeUseActionTypeEnum getActionTypeEnum(Byte actionType) {
        for (UserPrizeUseActionTypeEnum e : values()) {
            if (e.getType().equals(actionType)) {
                return e;
            }
        }
        return null;
    }

}
